<%--
  Created by IntelliJ IDEA.
  User: PC
  Date: 2017/5/7
  Time: 21:52
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2017/3/29
  Time: 11:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="../../static/common/layui/css/layui.css" media="all">
    <script type="text/javascript" src="/static/common/layui/layui.js"></script>
    <script type="text/javascript" src="/static/common/vue.min.js"></script>
    <script type="text/javascript" src="/static/common/axios.min.js"></script>
</head>
<body>
<%--视图层--%>
<div id="content" v-cloak>
    <div class="admin-main">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>个人信息</legend>
        </fieldset>

        <form class="layui-form" action="" method="post" onsubmit="return false;">
            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>姓名</label>
                <div class="layui-input-inline">
                    <input type="text" name="realname" lay-verify="required" v-model="user.realname" autocomplete="off" class="layui-input" readOnly>
                </div>
                <label class="layui-form-label layui-form-newlabel_ren"><span style="color: red">*</span>学号</label>
                <div class="layui-input-inline">
                    <input type="text" name="sno" v-model="user.workid" autocomplete="off" class="layui-input disabled" placeholder="输入学号" readOnly>
                </div>
                <div>
                    <div v-show="show">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-inline">
                            <div v-if="user.sex == 1">
                                <label class="layui-form-label" style="color: #999;text-align: center">男</label>
                            </div>
                            <div v-else="user.sex == 2">
                                <label class="layui-form-label" style="color: #999;text-align: center">女</label>
                            </div>
                        </div>
                    </div>
                    <div v-show="!show" style="display: none">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-inline">
                            <input lay-filter="sex" type="radio" name="sex" value="1" title="男" v-model="user.sex">
                            <input lay-filter="sex" type="radio" name="sex" value="2" title="女" v-model="user.sex">
                        </div>
                    </div>
                </div>
            </div>

            <%--院校 Begin--%>
            <div>
                <div class="layui-form-item">
                    <div v-show="showClass">
                        <div class="layui-inline">
                            <label class="layui-form-label"><span style="color: red">*</span>所属院校</label>
                            <div class="layui-input-inline" style="width: 160px;">
                                <input type="text"  class="layui-input" v-model="attribution.universityName" disabled>
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline" style="width: 160px;" >
                                <input type="text"  class="layui-input" v-model="attribution.schoolName" disabled>
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline" style="width: 160px;" >
                                <input type="text"  class="layui-input" v-model="attribution.departmentName" disabled>
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline" style="width: 160px;" >
                                <input type="text"  class="layui-input" v-model="attribution.majorName" disabled>
                            </div>
                            <div class="layui-form-mid">-</div>
                            <div class="layui-input-inline" style="width: 160px;" >
                                <input type="text"  class="layui-input" v-model="attribution.clazzName" disabled>
                            </div>
                        </div>
                    </div>
                    <div v-show="!showClass" style="display: none">
                        <label class="layui-form-label"><span style="color: red">*</span>所属院校</label>
                        <div class="layui-input-inline" style="width: 170px;">
                            <select name="university" lay-filter="university" lay-search>
                                <option value="">选择学校</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 170px;">
                            <select name="school" lay-filter="school" lay-search>
                                <option value="">选择学院</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 170px;">
                            <select name="department" lay-filter="department" lay-search>
                                <option value="">选择系部</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 180px;">
                            <select name="major" lay-filter="major" lay-search>
                                <option value="">选择专业</option>
                            </select>
                        </div>
                        <div class="layui-input-inline" style="width: 160px;">
                            <select name="clazz" lay-filter="clazz" lay-search>
                                <option value="">选择班级</option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <%--院校班级end--%>

            <div class="layui-form-item">
                <label class="layui-form-label"><span style="color: red">*</span>手机</label>
                <div class="layui-input-inline">
                    <input type="tel" name="phone" lay-verify="phone" v-model="user.mobilephone" autocomplete="off" class="layui-input" readOnly>
                </div>
                <label class="layui-form-label">微信</label>
                <div class="layui-input-inline">
                    <input type="text" name="wechat" v-model="user.wechat" autocomplete="off" class="layui-input" readOnly>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">QQ</label>
                <div class="layui-input-inline">
                    <input type="text" name="qq" v-model="user.qq" autocomplete="off" class="layui-input" readOnly>
                </div>
                <label class="layui-form-label"><span style="color: red">*</span>电子邮箱</label>
                <div class="layui-input-inline">
                    <input type="text" name="email" lay-verify="email" v-model="user.email" autocomplete="off" class="layui-input" readOnly>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">毕设指导</label>
                <div v-show="show" style="display: none">
                    <div class="layui-input-inline" v-if="teacherInfoPaperName==''">
                        <input type="text" name="teacherInfoPaperName" value="尚无导师" class="layui-input" disabled>
                    </div>
                    <div class="layui-input-inline" v-else>
                        <input type="text" name="teacherInfoPaperName" v-model="teacherInfoPaperName" autocomplete="off" class="layui-input" disabled>
                    </div>
                </div>
                <div v-show="!show" style="display: none" id="paper_show">
                    <div class="layui-input-inline" v-if="teacherInfoPaperName==''">
                        <input type="button" class="layui-btn-mini" value="选择毕业设计指导老师" id="applyPaper">
                    </div>
                    <div class="layui-input-inline" v-else>
                        <input type="text" name="teacherInfoPaperName" v-model="teacherInfoPaperName" autocomplete="off" class="layui-input" disabled>
                    </div>
                </div>
            </div>

            <div class="layui-form-item" name="intern">
                <label class="layui-form-label"><span style="color: red">*</span>实习指导</label>
                <div v-show="show" style="display: none">
                    <div class="layui-input-inline" v-if="teacherInfoInternName==''">
                        <input type="text" name="teacherInfoInternName" value="尚无导师" class="layui-input" disabled>
                    </div>
                    <div class="layui-input-inline" v-else>
                        <input type="text" name="teacherInfoInternName" v-model="teacherInfoInternName" autocomplete="off" class="layui-input" disabled>
                    </div>
                </div>
                <div v-show="!show" style="display: none">
                    <div class="layui-input-inline" v-if="teacherInfoInternName==''">
                        <input type="button" id="applyIntern" class="layui-btn-mini" value="申请实习指导老师">
                    </div>
                    <div class="layui-input-inline" v-else>
                        <input type="text" name="teacherInfoInternName" v-model="teacherInfoInternName" autocomplete="off" class="layui-input" disabled>
                    </div>
                </div>

                <%--实习导师指导状态--%>
                <label class="layui-form-label">指导状态</label>
                <div class="layui-input-inline">
                    <div v-if="studentInfo.advisestate==''">
                        <label class="layui-form-label" style="color: #999;text-align: center">未申请导师</label>
                    </div>
                    <div v-else-if="studentInfo.advisestate==1">
                        <label class="layui-form-label" style="color: #999;text-align: center">导师申请中</label>
                    </div>
                    <div v-else-if="studentInfo.advisestate==2">
                        <label class="layui-form-label" style="color: #999;text-align: center">导师指导中</label>
                    </div>
                    <div v-else-if="studentInfo.advisestate==3">
                        <label class="layui-form-label" style="color: #999;text-align: center">被无情拒绝</label>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">实习分数</label>
                <div class="layui-input-inline" v-if="studentInfo.internscore===0">
                    <input type="text" name="internscore" value="" autocomplete="off" class="layui-input" disabled="disabled">
                </div>
                <div class="layui-input-inline" v-if="studentInfo.internscore!==0">
                    <input type="text" name="internscore" v-model="studentInfo.internscore" autocomplete="off" class="layui-input" disabled="disabled">
                </div>
                <label class="layui-form-label">实习状态</label>
                <div class="layui-input-inline">
                    <div v-if="studentInfo.state==1||studentInfo.state==''">
                        <label class="layui-form-label" style="color: #999;text-align: center">未实习</label>
                    </div>
                    <div v-else-if="studentInfo.state==2">
                        <label class="layui-form-label" style="color: #999;text-align: center">实习申请中</label>
                    </div>
                    <div v-else-if="studentInfo.state==3">
                        <label class="layui-form-label" style="color: #999;text-align: center">实习中</label>
                    </div>
                    <div v-else-if="studentInfo.state==4">
                        <label class="layui-form-label" style="color: #999;text-align: center;width: 100px">实习变更申请中</label>
                    </div>
                    <div v-else-if="studentInfo.state==-1">
                        <label class="layui-form-label" style="color: #999;text-align: center">已毕业</label>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">实习评价</label>
                <div class="layui-input-inline">
                    <textarea v-model="studentInfo.advisorappraise" disabled="disabled" style="height: 100px;width: 300px;"></textarea>
                </div>
            </div>

            <div v-show="show">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input type="button" lay-filter="edit" class="layui-btn" @click="update" value="修改">
                    </div>
                </div>
            </div>
            <div v-show="!show" style="display: none">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-filter="save" lay-submit>提交</button>
                        <input type="button" class="layui-btn" @click="reload" value="返回">
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
    var userid = ${sessionScope.currentUser.getId()};
    <%--vm.studentInfo.paperadvisor = <%=request.getParameter("paperadvisorid")%>;--%>
    <%--vm.studentInfo.internadvisor = <%=request.getParameter("internadvisor")%>--%>
//    console.log(userid);
</script>
<script src="../../static/js/utils.js"></script>
<script src="../../static/js/student/personInfo.js"></script>
</body>
</html>
